<style>
    .grid-stack-item-content {
        text-align: center;
        background-color: rgba(255,255,255,.15);
        color: #fff;
    }
</style>
<widget-modal widget-modal-title="Widget Management">
    <form name ="widgetForm">
        <div class="wrapper">
            <div class="sidebar">
                <ul>
                    <li ng-repeat="(title, widget) in ctrl.widgets"  ng-if="title!='product' && title!='monitor2'"><a id="{{title}}-button" ng-click="ctrl.toggleWidget(title, $event)">
                        {{title}}</a></li>
                </ul>
                <br>

            </div>
            <div class="gui-view">
                <br>
                <div class="row">
                    <div class="col-md-12">
                        <div gridstack class="grid-stack" options="options" on-change="ctrl.onChange(event,items)" on-drag-start="ctrl.onDragStart(event,ui)" on-drag-stop="ctrl.onDragStop(event,ui)" on-resize-start="ctrl.onResizeStart(event,ui)" on-resize-stop="ctrl.onResizeStop(event,ui)">
                            <div gridstack-item ng-repeat="(title, w) in widgets" class="grid-stack-item" gs-item-x="w.x" gs-item-y="w.y"
                                 gs-item-width="w.width" gs-item-height="w.height" gs-item-autopos="1">
                                <div class="grid-stack-item-content widget">
                                    <div class="widget-body-config">
                                        <div>
                                            <div class="fa fa-cog fa-lg"></div>
                                            <div>{{title}}</div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="button-row row text-center">
            <button type="submit" class="btn btn-primary btn-wide" ng-click="ctrl.saveDashboard($event,widgetForm)">Create</button>
        </div>
    </form>
</widget-modal>